﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using BTN04.DTO;
using BTN04.BUS;
using System.Collections.Generic;


namespace BTN04.GUEST
{
    public partial class SanPhamTheoLoaiSanPham : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            LoaiSanPhamBUS lspBUS = new LoaiSanPhamBUS();
            List<LoaiSanPhamDTO> _lstLoaiSanPham = new List<LoaiSanPhamDTO>();
            _lstLoaiSanPham = lspBUS.DanhSachLoaiSanPham();
            LoaiSanPhamDTO lspDTO = new LoaiSanPhamDTO();
            if(Request.QueryString["id"] == null)
            {
                Response.Redirect("trangchu.aspx");
            }
            else
            {
                int _maLoaiSanPham = Convert.ToInt32(Request.QueryString["id"]);
                for (int i = 0; i < _lstLoaiSanPham.Count; i++ )
                {
                    if (_maLoaiSanPham == _lstLoaiSanPham[i].MaLoaiSanPham)
                        lblLoaiSanPham.Text = " >> SẢN PHẨM " + _lstLoaiSanPham[i].TenLoaiSanPham.ToUpper();
                }
            }
        }
    }
}
